package UnitTest.DataStructureTest.treeTest.binaryTreeTest.binaryTreeApplyTest;

import DataStructure.tree.binaryTree.binaryTreeApply.BT_MaxBroad;
import UnitTest.DataStructureTest.treeTest.binaryTreeTest.binaryTreeTestData.BT_TestData_Tree;
import org.junit.Test;

public class BT_MaxBroadTest extends BT_TestData_Tree {

    @Test
    public void test() {
        test(new BT_MaxBroad());
    }

    public void test(BT_MaxBroad instance) {
        int board = instance.GetMaxBroad(Tree_BT_Full_Level_WithNLF_1());
        assert board == 1;
        board = instance.GetMaxBroad(Tree_BT_Full_Level_WithNLF_2());
        assert board == 2;
        board = instance.GetMaxBroad(Tree_BT_Full_Level_WithNLF_3());
        assert board == 4;
        board = instance.GetMaxBroad(Tree_BT_Full_Level_WithNLF_4());
        assert board == 8;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_1());
        assert board == 1;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_2());
        assert board == 1;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_3());
        assert board == 1;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_4());
        assert board == 4;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_5());
        assert board == 2;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_6());
        assert board == 9;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_7());
        assert board == 17;
        board = instance.GetMaxBroad(Tree_BT_Level_WithNLF_8());
        assert board == 74;
    }

}
